<#import "/spring.ftl" as spring/>
<#import "/common/base.ftl" as base/>
<@base.page "采购退货">
<div ng-controller="finacePurchaseReturnListController">
<div class="col-lg-12">
        <div class="ibox float-e-margins">
          	<div class="filterItems">
				    <form class="form-inline">
				      <div class="form-group" style="width:18%">
				        <label for="orderCode">退货单号:</label>
				        <input type="text" class="form-control round-border" ng-model="returnOrder" name="returnOrder" style="width:60%">
				      </div>
				      <div class="form-group" style="width:28%">
				        <label for="supplierNo">供应商编码:</label>
				        <input type="text" class="form-control round-border" ng-model="supplierCode" id="supplierNo" style="width:60%">
				      </div>
				      <div class="form-group" style="width:28%">
					      <label for="supplierName">供应商名称:</label>
					      <input type="text" class="form-control round-border" ng-model="supplierName" id="supplierName" style="width:60%">
				      </div>
				      
				      <div class="form-group" style="width:15%;display:none">
				        <label for="outUserName">采购类型:</label>
                        <select class="form-control"  ng-model="purchaseType" name="purchaseType" style="width:50%">
					        <option value="" selected>全部</option>
					        <option value="0">普通采购</option>
					        <option value="1">采购退货</option>
				        </select>
				      </div>
				      
				      <div class="form-group" style="float:right;width:8%;margin-right:12px" >
                        <button type="button" class="btn btn-primary" ng-click="Search()" style="float:right">查询</button>
				      </div>
				      
				      <br>  <br>  
				      <div class="form-group" style="width:18%">
				        <label for="purchasePerson">采购人:&nbsp;&nbsp;&nbsp;</label>
				        <input type="text" class="form-control round-border" ng-model="purchasePerson" id="purchasePerson" style="width:60%">
				      </div>
				      <div class="form-group" style="width:60%">
				        <label for="datepicker">退货日期:&nbsp;&nbsp;&nbsp;&nbsp;</label>
				        <input type="text" class="form-control" ng-model="startTime" my97datepicker="{ dateFmt: 'yyyy-MM-dd', readOnly: true }" style="width:35%" readonly="readonly">
						<label for="datepicker">至</label>
						<input type="text" class="form-control" ng-model="endTime" my97datepicker="{ dateFmt: 'yyyy-MM-dd', readOnly: true }" style="width:35%" readonly="readonly">
				      </div>
				      
				      <div class="form-group" style="float:right;width:18%;margin-right:12px">
					      <button type="button" class="btn btn-primary" ng-click="Reset()" id="reset" style="float:right">重置</button>
				      </div>
				      <br><br>
				      
				    </form>
          	</div>
           <br>
            <div class="ibox-content">
              <ul class="nav nav-tabs"> 
			   <li class="active" id="286433" role="presentation"><a style="cursor:pointer;" ng-click="tabClick(286433,0)">未审核</a></li> 
			   <li class="" id="286434" role="presentation"><a style="cursor:pointer;" ng-click="tabClick(286434,1)">已审核</a></li> 
			   <li class="" id="286435" role="presentation"><a style="cursor:pointer;" ng-click="tabClick(286435,-1)">全部</a></li> 
			  </ul> 
			  <div id="DataTables_Table_0_wrapper" class="panel panel-default"  class="text-center" role="grid"> 
			   <div class="panel-body-scroll"> 
			    <table class="table table-hover"> 
			     <thead> 
			      <tr> 
			       <th style="text-align:center;" >退货单号</th>
                   <th style="text-align:center;" >审核状态</th>
                   <th style="text-align:center;" >财务审核状态</th>
                   <th style="text-align:center;" >采购类型</th>
                   <th style="text-align:center;" >供应商编码</th>
                   <th style="text-align:center;" >供应商名称</th>
                   <th style="text-align:center;" >结算方式</th>
                   <th style="text-align:center;" >退货日期</th>
                   <th style="text-align:center;" >采购人</th>
                   <th style="text-align:center;" >退货数</th>
                   <th style="text-align:center;" >退货金额</th>
                   <th style="text-align:center;" >实际发货数</th>
                   <th style="text-align:center;" width="10%">操作</th>
			      </tr> 
			     </thead> 
			     <tbody> 
			      <tr class="ng-scope" ng-repeat="returnOrder in returnOrderList ">
			       <td class="text-center">{{returnOrder.returnOrder}}</td> 
			       <td class="text-center">{{returnOrder.checkedState}}</td>
			       <td class="text-center">{{returnOrder.finaceCheckedState}}</td>
			       <td class="text-center">{{returnOrder.purchaseType}}</td>
			       <td class="text-center">{{returnOrder.supplierCode}}</td>
			       <td class="text-center">{{returnOrder.supplierName}}</td>
			       <td class="text-center">{{returnOrder.settmentType}}</td>
			       <td class="text-center">{{returnOrder.returnDate |date:'yyyy-MM-dd'}}</td>
			       <td class="text-center">{{returnOrder.returnPerson}}</td>
			       <td class="text-center">{{returnOrder.returnNumber}}</td>
			       <td class="text-center">{{returnOrder.returnAmount}}</td>
			       <td class="text-center">{{returnOrder.actualDeliveryNumber}}</td>
			       <td class="text-center">
			         <a style="cursor:pointer;" ng-click="ShowDetail(returnOrder.orderId);">查看</a> 
					 <a style="cursor:pointer;" ng-show="returnOrder.orderState==1" ng-click="Audit(returnOrder.orderId,returnOrder.returnOrder,returnOrder.orderState);">审核</a>
					 <a style="cursor:pointer;" ng-show="returnOrder.orderState==1" ng-click="Reject(returnOrder.orderId,returnOrder.returnOrder,returnOrder.orderState);">否决</a>
			       </td> 
			      </tr> 
			      <tr> 
			       <td colspan="13" class="text-center"> 
			        <nav>
			        <span style="margin-top :-22px;  left: 5%;position: absolute; width:100%">
						<ul class="pagination" style="height:10px">
						<li>
							<a href="#" aria-label="Previous" ng-click="GotoPage(CurrentPage-1)"><span aria-hidden="true">上一页</span></a>
						</li>
						<li ng-click="GotoPage(page)" href="#" ng-repeat="page in ShowPages">
							<a href="#">{{page}}</a>
						</li>
						<li>
							<a href="#" aria-label="Next" ng-click="GotoPage(CurrentPage+1)"><span aria-hidden="true">下一页</span></a>
						</li>
						</ul>
						<b><span style="padding: 30px 19px 14px 20px;top :-12px;position: relative;">第 {{CurrentPage}} 页 {{RecordCount}} 条</span></b>
						</span>
					</nav>
			       </td> 
			      </tr> 
			     </tbody> 
			    </table> 
			   </div> 
			  </div>
            </div>
        </div>
    </div>
 </div>
 <script src="<@spring.url '/assets/pagejs/purchaseReturnOrder/purchaseReturnOrder.js' />"></script>
</@base.page>
